

<?PHP
include 'o_transaction.php';


?>

<script src="admin/j/3/masked.js" type="text/javascript" charset="utf-8"></script>

	<?PHP
		begin_form('',$id,$conf->q,TRUE);
	?>
	<h2>Payment Details</h2>
	Payment Method: <?PHP echo $_SESSION["payment_method"];?>
	<input type="hidden"  value='<?PHP echo $_SESSION["payment_method"];?>' name='payment_method' />

	
	<input type="hidden"  value='true' name='verify' />
	
	<fieldset id='card_details'>


		<?PHP
		$e['form_card_number']=$form_card_number=randomchar();
		$e['form_card_cvv']=$form_card_cvv=randomchar();
		$e['form_card_expiry']=$form_card_expiry=randomchar();

		$e[$form_card_number]="4963044944466965";
		$e[$form_card_expiry]="10/2015";
		$e[$form_card_cvv]="123";
		$o['label']='Card Number';
		p_input($form_card_number,$o,$e);

		$o['label']='CVV';
		p_input($form_card_cvv,$o,$e);

		$o['label']='Expiry';
		p_input($form_card_expiry,$o,$e);

		p_hidden('form_card_number',$o,$e);
		
		p_hidden('form_card_cvv',$o,$e);
		p_hidden('form_card_expiry',$o,$e);

		?>
	</fieldset>
	<hr />
	<h2>Billing Information</h2>

	<?PHP
	
	$o['label']='Cardholder Name';
	p_input('serial_billing_name',$o,$e);
	
		$o['label']='Address';
		p_input('serial_billing_address',$o,$e);

		$o['label']='City ';
		p_input('serial_billing_city',$o,$e);
		$o['label']='Postcode';
		p_input('serial_billing_zip',$o,$e);
		
		$country_list=get_countries();
		$o['label']='Country';
		$o['none']=TRUE;

		p_select('serial_billing_country',$country_list,$e,'0','1',$o);
		//	p_input('serial_billing_country',$o,$e);
		?>
			<div id='stateholder'>


					<?PHP
					$o['label']='State';
					p_input('serial_billing_state',$o,$e);
					?>
			</div>

			<div id='regionholder' style='display:none;'>
					<?PHP
						$ph_list=get_ph_regions();
						$o['label']='Region';
						$o['none']=TRUE;

						p_select('serial_billing_region',$ph_list,$e,'0','1',$o);

					?>
			</div>
		<?PHP



	?>

<?PHP

printsubmit("Proceed");
end_form($_GET['cmd']);

?>
<script src="assets/js/o_pay.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
	jQuery(function($){
			var var_name = "<?PHP echo $_SESSION["payment_method"];?>";
					if(var_name=='Amex')
					{
					 
							$("#<?PHP echo $form_card_number;?>").mask("99999 99999 99999");
					} 
					else
					{
						   		$("#<?PHP echo $form_card_number;?>").mask("9999 9999 9999 9999");
					}
					
    
			$("#<?PHP echo $form_card_expiry;?>").mask("99/9999");
			$("#<?PHP echo $form_card_cvv;?>").mask("999");
	});
</script>
